<template>
  <div style="width: 750px;">
    <el-tabs
      style="--el-color-primary: #3271ae"
      v-model="activeName"
      type="card"
      @tab-click="handleClick"
    >
      <el-tab-pane
        label="商品介绍"
        name="commodityInfo"
      ><n-load-html :url="introduce"></n-load-html></el-tab-pane>
      <el-tab-pane
        label="商品评价"
        name="evaluation"
      >
        <comments :commodityId="commodityId"></comments>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
import CommentsVue from "./Comments.vue";
import NLoadHtmlVue from "../NLoadHtml.vue";

export default {
  components: {
    Comments: CommentsVue,
    NLoadHtml: NLoadHtmlVue,
  },
  props: {
    introduce: String,
    commodityId: Number,
  },
  data() {
    return {
      activeName: "commodityInfo",
    };
  },
};
</script>